<?php /* Smarty version Smarty-3.1.18, created on 2015-05-18 06:25:58
         compiled from "..\application\views\admin\category_index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:6266555985f679a145-06714196%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '3333ee43710f58666f26b7584fa6d8ef5560bd24' => 
    array (
      0 => '..\\application\\views\\admin\\category_index.tpl',
      1 => 1431506089,
      2 => 'file',
    ),
    '406fc35ce7e1ffa8b0b2a04fc5ef1d50364c058a' => 
    array (
      0 => '..\\application\\views\\admin\\admin_header.tpl',
      1 => 1431506089,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6266555985f679a145-06714196',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'active' => 0,
    'username' => 0,
    'info' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_555985f72a0ad7_97722296',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_555985f72a0ad7_97722296')) {function content_555985f72a0ad7_97722296($_smarty_tpl) {?><!DOCTYPE html>
<html>
<head>
	<title>机械电子学院网站后台管理系统</title>
	<meta charset="utf-8"/>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>
Public/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="<?php echo base_url();?>
Public/css/index.css">
	<script charset="utf-8" src="<?php echo base_url();?>
kindeditor/kindeditor-min.js"></script>
	<script charset="utf-8" src="<?php echo base_url();?>
kindeditor/php/upload_json.php"></script>
	<script charset="utf-8" src="<?php echo base_url();?>
kindeditor/plugins/autoheight/autoheight.js"></script>
	<script>
		 KindEditor.ready(function(K) {
		 		var options = {
		 			width : '100%',
		 			height : '200px',
		 			items : ['source', '|', 'undo', 'redo', '|', 'justifyleft', 'justifycenter', 'justifyright',
 							'justifyfull', '|', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
        					'italic', 'underline', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
        					'insertfile', 'table', 'hr','link', 'unlink', '|',],
        			autoHeightMode : true,
        			filterMode : false,
		 		}
                window.editor = K.create('textarea[name="Experience"]', options);
                window.editor = K.create('textarea[name="Research"]', options);
                window.editor = K.create('textarea[name="Description"]', options);
                window.editor = K.create('textarea[name="Prize"]', options);
                window.editor = K.create('textarea[name="SinglePage"]', options);
        });
	</script>
</head>
<body>
	<div class="navbar navbar-default navbar-fixed-top" style="background-color: #fff;border-color: #fff;">
		<div class="container">
			<div class="navbar-header">
				<a class="navbar-brand" href="#" style="font-size: 20px;">CloudCMS</a>
			</div>
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-nav">
					<li <?php echo IsActive('admin',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('category/admin');?>
">后台首页</a>
					</li>
					<li <?php echo IsActive('document',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('/document');?>
">内容管理</a>
					</li>
					<li <?php echo IsActive('category',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('/category');?>
">栏目管理</a>
					</li>
					<li <?php echo IsActive('user',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('/user');?>
">用户管理</a>
					</li>
					<li <?php echo IsActive('alumni',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('/alumni');?>
">院友管理</a>
					</li>
					<li <?php echo IsActive('message',$_smarty_tpl->tpl_vars['active']->value);?>
>
						<a href="<?php echo site_url('/document/Judge?Id=104');?>
">留言管理</a>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li>
						<a href="#">欢迎你，<?php echo $_smarty_tpl->tpl_vars['username']->value;?>
</a>
					</li>
					<li>
						<a href="<?php echo site_url('admin/logout');?>
">注销登陆</a>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right">
					<li>
						<a href="<?php echo base_url();?>
" target="__blank" style="color:#3071a9">网站首页</a>
					</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="container panel" style="margin-top: 70px;padding-bottom: 20px;min-height:580px;">
	<?php if (!empty($_smarty_tpl->tpl_vars['info']->value)) {?>
	<?php echo $_smarty_tpl->getSubTemplate ("admin/admin_info.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

	<?php }?>
	
<form action="<?php echo site_url("document/Sort?data=cate");?>
" method="post">
<h3>栏目管理
	<button type="submit" class="btn btn-sm btn-success" style="margin-left:20px;">排序</button>
	<span style="font-size:14px;color:red;">温馨提示：请谨慎添加或删除栏目，一级栏目不可删除。</span>
	<div class="pull-right">
		<a href="<?php echo site_url("document/TypeList");?>
" class="btn btn-sm btn-success">
			分类列表
		</a>
		<a href="<?php echo site_url('category/add');?>
" class="btn btn-sm btn-success">添加新栏目</a>
	</div>
</h3>
<div class="table-responsive">
	<table class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th>排序</th>
				<th>Id</th>
				<th>栏目名称</th>
				<th>栏目类型</th>
				<th style="text-align: center;">操作</th>
			</tr>
		</thead>
		<tbody>
			<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['category']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
			<tr>
				<td><input type="text" style="width:50px;height:20px;text-align:center;" name="<?php echo $_smarty_tpl->tpl_vars['v']->value['Id'];?>
" value="<?php echo $_smarty_tpl->tpl_vars['v']->value['Sort'];?>
"></td>
				<td><?php echo $_smarty_tpl->tpl_vars['v']->value['Id'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['v']->value['CateName'];?>
</td>
				<td><?php echo $_smarty_tpl->tpl_vars['v']->value['Type'];?>
</td>
				<td style="text-align: center;width: 10%;">
					<a href="<?php echo site_url("category/edit?Id=".((string)$_smarty_tpl->tpl_vars['v']->value['Id']));?>
" class="btn btn-xs btn-primary">编辑</a>
					<?php ob_start();?><?php echo site_url("category/delete?Id=".((string)$_smarty_tpl->tpl_vars['v']->value['Id']));?>
<?php $_tmp1=ob_get_clean();?><?php $_smarty_tpl->tpl_vars["deletehref"] = new Smarty_variable($_tmp1, null, 0);?>
					<a href="javascript:void(0)" onclick="modal('<?php echo $_smarty_tpl->tpl_vars['deletehref']->value;?>
')" class="btn btn-xs btn-danger">删除</a>
				</td>
			</tr>
			<?php } ?>
		</tbody>
	</table>
</div>
</form>

	<?php echo $_smarty_tpl->getSubTemplate ("admin/admin_modal.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

	</div>
	<script src="<?php echo base_url();?>
Public/js/jquery-1.11.1.min.js"></script>
	<script src="<?php echo base_url();?>
Public/bootstrap/js/bootstrap.min.js"></script>
	<script src="<?php echo base_url();?>
Public/js/index.js"></script>
	    <script>
        function modal(href)
        {
        	$('#delete-url').attr('href',href);
            $('#myModal').modal();
        }
    </script>
	</body>
</html>
<?php }} ?>
